﻿<!DOCTYPE html>
<html>
<!-- 个人安全行动计划审批 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>
    <style>
        .el-table__body-wrapper table tbody tr td {
            text-align: center;
        }
    </style>
</head>

<body>
    
<div id="app" v-cloak>   
        <el-form id="" label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />个人安全行动计划审批列表</strong></div>
<span>
    <btn :text="col.btnSelect" imgsrc="/static/images/search.png" @click="onSubmit">
    </btn>
    <!--<btn :text="col.btnApprova" imgsrc="/static/images/general.png" linetype="4" @click="auditServer">
    </btn>-->
    <!--<btn-export-list url="xxxx" :forminline="this.formInline" linetype="5"></btn-export-list>-->
</span>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{PersonSafePlanManagement.year+mark.m}}
                                </template>
                                <el-date-picker v-model="formInline.model.year" type="year" slot="suffix" format="yyyy"
                                                value-format="yyyy" size="mini">
                                </el-date-picker>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>

                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{PersonSafePlanManagement.quarter+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.quarter" slot="suffix" placeholder="请选择">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="第一季度" value="1"></el-option>
                                    <el-option label="第二季度" value="2"></el-option>
                                    <el-option label="第三季度" value="3"></el-option>
                                    <el-option label="第四季度" value="4"></el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>

                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    <div> {{PersonSafePlanManagement.examination+mark.m}}</div>
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.state" slot="suffix" placeholder="请选择">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="未提交" value="0"></el-option>
                                    <el-option label="未审批" value="1"></el-option>
                                    <el-option label="审批通过" value="2"></el-option>
                                    <el-option label="审批未通过" value="3"></el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>

                    </div>
                </el-col>
            </el-row>
        </el-form>
        <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
                  border @selection-change="selsChange" row-style="height:10px" style="width: 100%;">
            <!--@selection-change="handleSelectionChange"-->
            <!--<el-table-column type="selection" align="center" width="55" :reserve-selection="true">
    </el-table-column>-->
            <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="55"></el-table-column>
            <el-table-column prop="mark02" :label="PersonSafePlanManagement.SysDepartmentName" min-width="150"
                             show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column prop="mark01" :label="PersonSafePlanManagement.SysUserInforName" min-width="150"
                             show-overflow-tooltip="true">
            </el-table-column>
            <el-table-column prop="year" :label="PersonSafePlanManagement.year" min-width="100">
            </el-table-column>
            <el-table-column prop="quarterText" :label="PersonSafePlanManagement.quarter" min-width="110">
                <!--<template slot-scope="scope">
            <p v-if="scope.row.quarter=='1'">
                第一季度
            </p>
            <p v-if="scope.row.quarter=='2'">
                第二季度
            </p>
            <p v-else-if="scope.row.quarter=='3'">
                第三季度
            </p>
            <p v-else-if="scope.row.quarter=='4'">
                第四季度
            </p>

        </template>-->
            </el-table-column>
            <el-table-column prop="createTime" :label="PersonSafePlanManagement.createTime" :formatter="myformatDate" min-width="150">
            </el-table-column>
            <el-table-column prop="stateText" :label="PersonSafePlanManagement.examination" min-width="100">
                <!--<template slot-scope="scope">
            <p v-if="scope.row.state=='0'">
                未提交
            </p>
            <p v-if="scope.row.state=='1'">
                未审批
            </p>
            <p v-else-if="scope.row.state=='2'">
                审批通过
            </p>
            <p v-else-if="scope.row.state=='3'">
                审批未通过
            </p>

        </template>-->
            </el-table-column>
            <el-table-column prop="approveDate" :label="PersonSafePlanManagement.approveDate" :formatter="myformatDate" min-width="110">
            </el-table-column>
            <el-table-column prop="actualContent" :label="PersonSafePlanManagement.actualContent" min-width="150"
                             show-overflow-tooltip="true">
            </el-table-column>
            <!--<el-table-column prop="attachmentName" :label="PersonSafePlanManagement.attachment" min-width="110">
    </el-table-column>-->
            <el-table-column prop="attachmentName" label="面谈记录" min-width="110">
                <template slot-scope="scope">
                    <a href="javacript:void(0);" @click=downFile(scope.row.attachmentId)>
                        <!--{{ scope.row.attachmentName}}-->
                        下载
                    </a>
                </template>
            </el-table-column>
            <el-table-column width="53" :label="col.btnApprova" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=ApprovalInput('sp',scope.row.id)>
                        <i class="el-icon-approval"></i>
                    </button>
                </template>
            </el-table-column>
            <!--<el-table-column width="53" :label="col.btnFinish" fixed="right">
        <template slot-scope="scope">
            <button type="button" class="elst-bt-xg" @click=FinishInput('wc',scope.row.id)>
                <i class="el-icon-s-claim"></i>
            </button>
        </template>
    </el-table-column>-->
        </el-table>
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <!-- 弹出页 -->
        <el-dialog title="个人安全行动计划审批" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%"
            height="80%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                //表单内容
                ListItem: ListItem,
                //获取下拉菜单situation
                situation: [],
                sels: [],
                formInline: {
                    model: { year: '', quarter: '',state:'1' },
                    offset: 0,
                    limit: 10
                }
            },
            mounted: function () {
                //console.log(getDicDataArray(["01", "02", "03", "04"]))
                //formInline.model.state = '1';
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //关闭Dialog 回调
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/JG_PersonalSafety/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                ApprovalInput: function (val, id) { DialogShow(this, val, "PersonSafePlanApprovalInput.html", id); },
                FinishInput: function (val, id) { DialogShow(this, val, "PersonSafePlanApprovalInputFinish.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/JG_PersonalSafety/GetList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //获取下拉菜单数据
                getDropDown: function () {
                }, downFile: function (id) { if (id == null || id == "" || id == undefined) { alert('没有上传面谈记录附件！'); } else { window.open(downLoadPath(id)); }},
                selsChange(sels) {
                    this.sels = sels
                },
                auditServer() {
                    var servids = this.sels.map(item => item.id).join(",")
                    DialogShow(this, 'sp', "PersonSafePlanApprovalInput.html", servids);
                },
            }
        });
    </script>
</body>

</html>